﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SRAGWMCLib.OO
{
    /// <summary>
    /// Contains the values to fill the addMarker
    /// </summary>
    /// 

    public class DataSource
    {

        /// <summary>
        /// Name of the Marker to be added 
        /// </summary>
        
        public string DBMarkerName { get; set;}
        
        /// <summary>
        /// The name of the DataBase connection previously set into the DataBase Class
        /// </summary>
        /// 

        public string DBConnectionName { get; set;}

        /// <summary>
        /// The name of the table that contains the geometry fields of the desired area to be displayed
        /// </summary>

        public string DBTableName { get; set;}

        /// <summary>
        /// The fields of the desired table that will be used to serve as tooltip
        /// </summary>

        public string[] TableFields { get; set;}

        /// <summary>
        /// Fills teh DataSource data to later use onto the addMarker
        /// </summary>
        /// <param name="pDBMarkerName">Name to be added to teh Marker to be displayed</param>
        /// <param name="pDBConnectionName">Name previously set into the DataBase Class</param>
        /// <param name="pDBTableName">Name of the Table that contains the geometry fields of the area to be displayed</param>
        /// <param name="pTableFields">Fields of the selected table to be used as tooltip</param>
        
        public DataSource(string pDBMarkerName, string pDBConnectionName, 
            string pDBTableName, string[] pTableFields) 
        {
            DBMarkerName = pDBMarkerName;
            DBConnectionName = pDBConnectionName;
            DBTableName = pDBTableName;
            TableFields = pTableFields;   
        }
    }
}
